"""
考勤
"""

from fastapi import Depends

from api import attendance_router
from db import attendance_db
from dependencies.attendance_depend import AttendanceListQueryParams
from schema.response_schema.attendance_response import AttendanceListResponse


@attendance_router.get(
    path="/list/",
    summary="考勤列表",
    response_model=AttendanceListResponse,
)
def attendance_list(query: AttendanceListQueryParams = Depends()):
    """ 考勤列表接口 """

    return attendance_db.attendance.paginated_query(**query.to_dict())
